package com.sz.demo.model;

import java.math.BigDecimal;

/**
 * 水果抽象类
 * @author Lenovo
 */
public abstract class Fruit extends Product {

    public Fruit(String name, BigDecimal pricePerPound, String unit) {
        super(name, pricePerPound, unit);
    }

    /**
     * 重写父类的calculatePrice方法，保持原有逻辑
     */
    @Override
    public BigDecimal calculatePrice(int weight) {
        return super.calculatePrice(weight);
    }
}